class Animal:
    def eat(self):
        print("-------吃------")

    def drink(self):
        print("-------喝------")

    def sleep(self):
        print("-------睡------")

class Cat(Animal):
    def run(self):
        print("-------跑------")

class Dog(Animal):
    def walk(self):
        print("-------walk------")

    def drink(self):
        print("重写父类的方法")
        #调用父类的2种方法
        # Animal().drink()
        # super().drink()



cat = Cat()
cat.eat()

dog = Dog()
dog.drink()


